package com.ruibo.system;

import org.apache.commons.lang3.time.DateFormatUtils;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Date;

/**
 * @description:
 * @author: 孙 峰
 * @time: 2020/8/19 15:24
 */
public class LocalDateDemo {
    public static void main(String[] args) {
        LocalDate localDate = LocalDate.now();
        Date now = new Date();
        System.out.println( DateFormatUtils.format(now, "yyyy/MM/dd"));
        DateTimeFormatter pattern = DateTimeFormatter.ofPattern("yyyy/MM/dd");
        String format = LocalDate.now().format(pattern);



        System.out.println(format);
    }
}
